home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / lord2b7.zip / CASTLE4.REF < prev    next >
Text File  |  1997-05-27  |  10KB  |  576 lines

  1. ;note to .ref masters:
  2. ;replace castle4 with something else to use this .ref for other dwellings
  3. ;this .ref uses no long term vars, instead it makes its own data file - this
  4. ;means upgrading the game will not make people 'lose ownership' of their
  5. ;stuff.
  6.  
  7.  
  8. @#priv
  9. @do moveback
  10. @do saybar
  11. Ahhh!  The private bedroom!  Nothing can hurt you here.
  12.  
  13. @#innkeeper
  14.  
  15.  
  16. @do moveback
  17.  
  18. @if castle4.dat exist false then do
  19.   @begin
  20.   @closescript
  21.   @end
  22.  
  23. @readfile castle4.dat
  24. `p20
  25. `s01
  26. @
  27.  
  28. @if `p20 is &playernum then do
  29.   @begin
  30.   @do moveback
  31.   @do saybar
  32. `0Innkeeper: `2Greetings, s&sir!
  33.   @closescript
  34.   @end
  35.  
  36.  
  37.  
  38. @if castle4a.dat exist false then do
  39.   @begin
  40.   @writefile castle4a.dat
  41. 200
  42. 0
  43.   @
  44.   @end
  45.  
  46.   @readfile castle4a.dat
  47. `p26
  48. `p27
  49.   @
  50.  
  51.  
  52. @do `v01 is 1
  53. @show
  54. `r0`c  `r1  `%Getting a room  `r0
  55.  
  56. `2  The Innkeeper looks at you.  `0"Kin I getcha a room?  Today it costs
  57.   only `$$`p26!`2"
  58.  
  59. @do write
  60. `x`x
  61. @choice
  62. Yeah, what a great deal.
  63. Shyeah, right.
  64. @if responce is 1 then do
  65.   @begin
  66.   @if money < `p26 then do
  67.     @begin
  68.     @show
  69. `\`\  `2You sort of lack the funds right now.  Looks like you're sleeping
  70.   outside...
  71.  
  72. `k
  73.    @do goto innkeeper
  74.    @end
  75.  
  76.   @do money - `p26
  77.   @do `p27 + `p26
  78.   @do delete castle4a.dat
  79.   @writefile castle4a.dat
  80. `p26
  81. `p27
  82.   @
  83.    @writefile mail\mail`p20.dat
  84.   `0Business note:
  85. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  86. `0  `n`2 has stayed at your Inn!  Cha-CHING!
  87.  
  88.   @do y - 3
  89.   @drawmap
  90.   @update
  91.   @do saybar
  92. `0Bartender:  `2"Great!  Go upstairs and pick out a bed!"
  93.   @closescript
  94.   @end
  95.  
  96. @drawmap
  97. @update
  98.  
  99. @#pass1
  100. @readfile castle4.dat
  101. `p20
  102. `s01
  103. @if `p20 is &playernum then do
  104.   @begin
  105.   @closescript
  106.   @end
  107.  
  108. @if &lasty is 11 then do
  109.   @begin
  110.   @do moveback
  111.   @do saybar
  112. `0Innkeeper:  `2You need to pay me before you can go back there.
  113.   @end
  114.  
  115. @#pass2
  116. @if castle4.dat exist false then do
  117.   @begin
  118.   @closescript
  119.   @end
  120.  
  121. @if &lastx is 58 then do
  122.   @begin
  123.   @closescript
  124.   @end
  125.  
  126. @readfile castle4.dat
  127. `p20
  128. `s01
  129. @if `p20 is &playernum then do
  130.   @begin
  131.   @closescript
  132.   @end
  133.  
  134. @do moveback
  135.  
  136.   @do `s02 is getname `p20
  137.   @do upcase `s01
  138.   @if `s01 is NONE then do
  139.    @begin
  140.   @do moveback
  141.   @do saybar
  142. `0Innkeeper:  `2No one is allowed over there.. it's private.
  143.  
  144.    @closescript
  145.    @end
  146.  
  147.   @show
  148. `r0`c  `r1 Entrance to the private area `r0
  149.  
  150. `2  `2The Innkeeper looks over at you.  `0"Hey!  What business do you have
  151.   going in there?"
  152.  
  153. @do write
  154. `x`x
  155. @do `v01 is 1
  156. @choice
  157. Offer an explanation
  158. Nevermind
  159.   @if response is 1 then do
  160.    @begin
  161.    @do write
  162. `\`\  `2Say what? :`x
  163.   @do readstring 40 NIL `s03 
  164.   @do upcase `s03
  165.   @do upcase `s01
  166.  
  167.   @if `s03 is `s01 then do
  168.     @begin
  169.     @show
  170. `\`\  `0"Ok, go on in then!"`\`\`k
  171.     @do x + 1
  172.     @drawmap
  173.     @update
  174.     @closescript
  175.     @end
  176.    @writefile mail\mail`p20.dat
  177.   `0Inkeeper Reports:
  178. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  179. `0  `n`2 attempted to get to the private bedroom by saying
  180.   `0"`s03"`2.  `2He was `bNOT`2 allowed in.
  181.  
  182.    @show
  183. `\`\  `2The Innkeeper isn't impressed.`\`\`k
  184.    @do moveback
  185.    @do goto done
  186.    @end
  187.  
  188.   @do goto done
  189.  
  190.  
  191.  @#done
  192.  @drawmap
  193.  @update
  194.  
  195. @#doorguard
  196. @do moveback
  197. @label startg
  198. ;guy who owns on it pushes against the door guard symbol.  This lets him
  199. ;control the password to gain entrance to the castle, as well as sell it
  200. ;back or transfer ownership.
  201.  
  202. @if castle4a.dat exist false then do
  203.   @begin
  204.   @writefile castle4a.dat
  205. 200
  206. 0
  207.   @end
  208.  
  209.  
  210. @if castle4.dat exist false then do
  211.   @begin
  212.   @do saybar
  213. `0"Get out please!  The Inn has been sold!" `2the Innkeeper commands.
  214.  @closescript
  215.   @end
  216.  
  217. @readfile castle4.dat
  218. `p20
  219. `s01
  220. @
  221.  
  222.   @readfile castle4a.dat
  223. `p26
  224. `p27
  225.   @
  226.  
  227.  
  228. ;load owner and current password
  229.  
  230. @if `p20 not &playernum then do
  231.   @begin
  232.   @do saybar
  233. You wave to the Innkeeper.
  234.   @closescript
  235.   @end
  236. @busy
  237.  
  238.  
  239. @do `v01 is 1 ;set default choice to 1
  240. @show
  241. `r0`c  `r1 Instructing your servants `r0
  242.  
  243.   `2The Innkeeper stops working for a moment.
  244.  
  245. @do write
  246. `x`x
  247. @choice
  248. Set password to private bedroom. (currently is `0`s01`%)
  249. Ownership options
  250. Set inn fee (currently is at `$$`p26`%)
  251. Take money from register
  252. Leave
  253. @
  254.  
  255. @if responce is 4 then do
  256.   @begin
  257.   @if `p27 < 1 then do
  258.    @begin  
  259. @show
  260. `\`\  `0"Before you look in that register.. lemmie tell you business has
  261.   been a little slow." `2the Innkeeper tells you.
  262.  
  263. `k  `$"How slow?" `2you ask.
  264.  
  265. `k  `0"Ok, we have not had a single customer since you last checked, ARE
  266.   YOU HAPPY NOW!?" `2the Innkeeper cries as he bursts into tears.
  267.  
  268. `k
  269.    @do goto doorguard
  270.    @end
  271.  
  272.  
  273.   @readfile castle4a.dat
  274. `p26
  275. `p27
  276.   @
  277.   @do money + `p27
  278.   @do delete castle4a.dat
  279.   @writefile castle4a.dat
  280. `p26
  281. 0
  282.   @
  283.  
  284.   @show
  285. `\`\  `2Sure, we've made `$$`p27`2, here ya go!
  286.  
  287. `k
  288.   @end
  289.  
  290. @if responce is 3 then do
  291.   @begin
  292.   @do write
  293. `\`\`x`xNew fee? :`x
  294.   @do readnum 10 `p26
  295.   @if `v40 < 0 then do
  296.     @begin
  297.     @show
  298. `\`\  `2Price set to `$$`v40`2.
  299.  
  300. `k  `2You think you're pretty smart, don't you.
  301.  
  302. @do `v01 is 1
  303. @do write
  304. `x`x
  305. @choice
  306. Yes, yes I do.  Now please give me 1,000,000 gold for free, I deserve it.
  307. No, you oh computer are the true master.  We humans suck.
  308. @if responce is 1 then do
  309.   @begin
  310.   @show
  311. `\`\  `2GET OUT OF HERE BEFORE I `bDELETE`2 YOU!  Next time I will.
  312.  
  313.   @do goto doorguard
  314.   @end
  315.  
  316. @if responce is 2 then do
  317.   @begin
  318.   @show
  319. `\`\  The computer playfully slaps your ass as it walks out.
  320.  
  321.   @do goto doorguard
  322.  
  323.   @end
  324.  
  325.     @do goto doorguard
  326.     @end
  327.   @readfile castle4a.dat
  328. `p26
  329. `p27
  330.   @
  331.   @do `p26 is `v40
  332.   @do delete castle4a.dat
  333.   @writefile castle4a.dat
  334. `p26
  335. `p27
  336.   @
  337.   @do goto doorguard
  338.   @end
  339.  
  340.  
  341.  
  342. @if responce is 2 then do
  343.  @begin
  344.  @show
  345. `r0`c  `r1 Ownership Options `r0
  346.  
  347.   `2You retrieve your deed and carefully look it over.
  348.    
  349.    @do `v01 is 1
  350.    @do write
  351. `x`x
  352.    @choice
  353. Transfer deed to someone else
  354. Sell property back to the bank for `$10000`%.
  355. Do nothing of the sort
  356.  @if response is 1 then do
  357.    @begin
  358.    @show
  359. `\`\  `2Transfer to whom?
  360.    @chooseplayer `p20
  361.  
  362.    @if `p20 is 0 then do
  363.     @begin
  364.     @show
  365.   `2You decide to keep your domain - for now.`\`\`k
  366.     @do goto startg
  367.     @end
  368.    @do `s02 is getname `p20
  369.    @show
  370. `2  Are you sure you wish to give your Inn to `0`s02`2?
  371. @do write
  372. `x`x
  373. @choice
  374. Yes
  375. Not on your life.
  376.  @if responce is 2 then do
  377.    @begin
  378.     @show
  379. `\`\  `2You decide to keep your domain - for now.`\`\`k
  380.     @do goto startg
  381.    @end
  382.  
  383.   @do delete castle4.dat
  384.   @writefile castle4.dat
  385. `p20
  386. `s01
  387. 0
  388. 0
  389. 0
  390. 0
  391.    @writefile mail\mail`p20.dat
  392.   `0Business note:
  393. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  394. `0  `n`2 has transferred ownership of Sosen Inn to you. 
  395.   Password to enter bedroom will remain `0"`s01"`2 unless
  396.   `2you come by and change it.
  397.  
  398.     @do addlog
  399.   `0`n`2 has given `%Sosen Inn`2 to `0`s02`2!
  400.      @routine seperate in gametxt.ref
  401.  
  402.     @show
  403. `\`\  `2Deed transfered.  Oh well - it was fun while it lasted.`\`\`k
  404.    @do goto done
  405.    @end
  406.   @if response is 2 then do
  407.     @begin
  408.     @show
  409. `\`\`2  Are you sure you wish to sell your Inn back to the bank?`\
  410. @do `v01 is 1
  411. @do write
  412. `x`x
  413. @choice
  414. Yes
  415. Not on your life.
  416.  @if responce is 2 then do
  417.    @begin
  418.     @show
  419. `\`\  `2You decide to keep your domain - for now.`\`\`k
  420.     @do goto startg
  421.    @end
  422.  
  423.   @do delete castle4.dat
  424.   @do delete castle4a.dat
  425.   @do money + 10000
  426.   @show
  427. `\`\  `%INN SOLD!`2`\`\`k
  428.     @do addlog
  429.   `0`n`2 has sold `%Sosen Inn`2 back to the bank!
  430.     @routine seperate in gametxt.ref
  431.     @do goto done
  432.     @end
  433.  
  434.  
  435.   @do goto startg
  436.  @end
  437.  
  438. @if responce is 1 then do
  439.   @begin
  440.   @do write
  441. `\`\  `0"And the new password, s&sir?" `2(enter `4NONE`2 for no access to anyone)`\  `2Password:`x
  442.   @do readstring 40 `s01 `s01 
  443.   @do `p20 is length `s01
  444.   @if `p20 < 2 then do
  445.    @begin
  446.    @show
  447. `\`\  `2You decide the current password is ok.`\`\`k
  448.    @do goto startg
  449.    @end
  450.   @do delete castle4.dat
  451.   @writefile castle4.dat
  452. &playernum
  453. `s01
  454. 0
  455. 0
  456. 0
  457. 0
  458. @show
  459. `\`\  `0"Yes s&sir, I will not forget it!" `2the Innkeeper promises.`\`\`k
  460.    @do goto startg
  461.   @end
  462.  
  463. @drawmap
  464. @update
  465.  
  466. @#sign
  467. @do moveback
  468.  
  469.  @if castle4.dat exist false then do
  470.  @begin
  471.  @do saybar
  472. Sosen Inn - For sale cheap, enquire inside.
  473.  @end 
  474.  
  475. @if castle4.dat exist true then do
  476.  @begin
  477. @readfile castle4.dat
  478. `p20
  479. `s01
  480. @
  481. @do `s01 is getname `p20
  482.  @do saybar
  483. `2Property of `0`s01`2.
  484.  @end 
  485.  
  486. @#enter
  487. @do moveback
  488. @offmap
  489.  
  490.  
  491. @if castle4.dat exist false then do
  492.   @begin
  493.   @show
  494. `r0`c  `r1 `%For Sale `r0
  495.  
  496.   `2Sosen Inn - money making opportunity.  Buy it now, only asking
  497.   `$$20,000`2.
  498.   
  499.   Buy now and recieve the following bonuses:
  500.  
  501.   `0* `2Private area for you
  502.  
  503.   `0* `2Upstairs for your guests - you can set any price you want
  504.  
  505. @do `v01 is 1
  506. @do write
  507. `x`x
  508. @choice
  509. >&money 19999 Purchase it.
  510. <&money 20000 Sigh wistfully and leave since you don't have enough.
  511. >&money 19999 Leave.
  512. @
  513.  
  514. @if responce is 1 then do
  515.   @begin
  516.   @if castle4.dat exist true then do
  517.     @begin
  518.     @show
  519. `\`\  `2Oh crap!  Someone bought it while you were thinking about it.  You
  520.   will regret your snail like thinking for the rest of your days.`\`\`k
  521.     @do goto done
  522.     @end
  523.  
  524.   @writefile castle4.dat
  525. &playernum
  526. NONE
  527. 0
  528. 0
  529. 0
  530. 0
  531.     @do money - 20000
  532.     @do addlog
  533.   `0`n `2buys `%Sosen Inn`2!
  534.      @routine seperate in gametxt.ref
  535.  
  536.   @show
  537. `r0`c  `r1 `%Why hello there, landowner! `r0
  538. `\`2  Nice job!  You now own this Inn!
  539.  
  540.   `2Enjoy your new home.`\`\`k
  541.   @end
  542.  
  543. @label done
  544. @drawmap
  545. @update
  546. @closescript
  547.   @end
  548.  
  549. @readfile castle4.dat
  550. `p20
  551. `s01
  552. @
  553.  
  554. @do `p21 is deleted `p20
  555.  
  556. @if `p21 is 1 then do
  557.   @begin
  558.    ;owner got deleted!!!  Lets put it up for sale again.
  559.    @do delete castle4.dat
  560.     @do addlog
  561.   `%Sosen Inn`2 is put on the market today.
  562.      @routine seperate in gametxt.ref
  563.  
  564.    ;run script again
  565.    @do goto enter
  566.   @end
  567.  
  568. ;let him in
  569. @label letmein
  570. @do x is 51
  571. @do y is 12
  572. @do map is 616
  573. @loadmap &map
  574. @do goto done
  575. @#done
  576.